<?php
/*
 * Smarty plugin
 * -------------------------------------------------------------
 * File:     ..php
 * Type:     
 * Name:     
 * Purpose:  
 * -------------------------------------------------------------
 */
function smarty_resource_box_source($tpl_name, &$tpl_source)
{
	list( $box, $file ) = explode("/", $tpl_name);
	if ( $tpl_source = file_get_contents( "Engine".DIRECTORY_SEPARATOR."plugins".DIRECTORY_SEPARATOR."Box".DIRECTORY_SEPARATOR."$box".DIRECTORY_SEPARATOR."$file.tpl" ) )
		return true;
	return false;
}

function smarty_resource_box_timestamp($tpl_name, &$tpl_timestamp)
{
	list( $box, $file ) = explode("/", $tpl_name);
	if ( $tpl_timestamp = filemtime( "Engine".DIRECTORY_SEPARATOR."plugins".DIRECTORY_SEPARATOR."Box".DIRECTORY_SEPARATOR."$box".DIRECTORY_SEPARATOR."$file.tpl" ) )
		return true;
	return false;
}

function smarty_resource_box_secure($tpl_name)
{
    // assume all templates are secure
    return true;
}

function smarty_resource_box_trusted($tpl_name)
{
    // not used for templates
}
?> 